package com.example.controller;

import com.example.service.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mdl
 * @date 2020/3/12 14:45
 */
@RestController
@RequestMapping("/")
public class TestController {

    @Reference(version = "${dubbo.version}")
    private HelloService helloService;

    @RequestMapping("say/{msg}")
    public void say(@PathVariable String msg){
        helloService.say(msg);
    }

    @RequestMapping("eatMenu/{type}")
    public String eatMenu(@PathVariable Integer type){
        return helloService.eatMenu(type);
    }



}